<include file="__THEME__/header" />
<link href="../Public/css/space.css" rel="stylesheet" type="text/css" />
<script>
var uid = '{$uid}';
//回复留言
function doreplaywall(fid){
	var content = $.trim($("#replay_content_"+fid).val());
	if(content){
		$.post('{:U("space/Wall/dowall")}',{touid:uid,fid:fid,content:content},function(result){
			result = eval("("+result+")");
			var html = '<div class="appra"><div class="headpic50 L">'
					 + '<a href="__APP__&mod=View&uid='+result.fromuid+'"><img src="'+result.userface+'" /></a></div>'
	        		 + '<div class="LC2">'
	       			 + '<p class="bg01 pl5"><a href="__APP__&mod=View&uid='+result.fromuid+'">'+result.username+'</a> {:L("just_now")}</p>'
	        		 + '<p class="pl10 lh30">'+result.content+'</p>'
	      			 + '</div><div class="C"></div></div>';
			$("#replay_content_"+fid).val('');
			$("#doreplay_"+fid).hide();
	        $("#doreplay_"+fid).before(html);
		});
	}else{
		$.tbox.no("{:L('no_empty_reply')}","{:L('error')}");
	}
}

//删除留言
function dodelwall(id){
	if(confirm("{:L('delete_tip')}")){
		$.post('{:U("space/Wall/dodel")}',{id:id},function(result){
			$("#wall_"+id).remove();
		});
	}
}

</script> 
<div class="contents lbg B">
  <!--左边信息 begin-->
  <include file="../Public/home_left" />
  <!--中间信息 begi-->
  <div class="contents_min w787">
      <h3 class="tit_h3">{:L('col_feed')}</h3>
    <div class="list_cate_nav mt20">
      <div class="tab" >
        <ul rel="tab">
          <li class="on" condition="all">
            <span >{:L('col_wall')}</span>
          </li>
        </ul>
      </div>
      <div>
      <div class="sidebar_R">
        <dl class="FSort base_input">
          <dt>{:L('view')}</dt>
          <php>$spage=($_GET['p'])?'&p='.$_GET['p']:''</php>
          <dd 
          
          <eq name="d" value="">class="ic"</eq>
          ><a href="{:U('home/message/wall')}{$spage}">{:L('all')}</a>
          </dd>
          <dd 
          
          <eq name="d" value="today">class="ic"</eq>
          ><a href="{:U('home/message/wall','d=today')}{$spage}">{:L('daily')}</a>
          </dd>
          <dd 
          
          <eq name="d" value="weekday">class="ic"</eq>
          ><a href="{:U('home/message/wall','d=weekday')}{$spage}">{:L('weekly')}</a>
          </dd>
          <dd 
          
          <eq name="d" value="month">class="ic"</eq>
          ><a href="{:U('home/message/wall','d=month')}{$spage}">{:L('monthly')}</a>
          </dd>
        </dl>
      </div>
      <div class="book">
        <ul id="wall_list" class="f12">
          <volist id="vo" name="data">
            <li id="wall_{$vo.id}" class="Fli">
              <div>
                <div class="headpic50 L"><a href="{:U('space/view','uid='.$vo[fromuid])}"><img src="{$vo.fromuid|getUserFace='s'}" width="50" /></a></div>
                <div class="LC">
                  <p class="bg01 pl5"><span class="R pr10">
                    <php>if($vo['uid']==$mid){</php>
                    <a href="javascript:void(0)" onclick='$("#doreplay_{$vo.id}").show()'>{:L('reply')}</a> <a href="javascript:void(0)" onclick="dodelwall({$vo.id})">{:L('delete')}</a>
                    <php>}</php>
                    </span> <a href="{:U('space/view','uid='.$vo[fromuid])}">{$vo.fromuid|getUserName}</a> {$vo.cTime|friendlyDate}
                    <eq name="vo['stealth']" value="1"><font color="red">【{:L('quite_msg')}】</font></eq>
                  </p>
                  <p class="pl10 lh30"> {$vo.content} </p>
                </div>
                <div id="replaylist_{$vo.id}">
                  <volist id="svo" name="vo['reply']">
                    <div class="appra">
                      <div class="headpic50 L"><a href="{:U('space/view','uid='.$svo[fromuid])}"><img src="{$svo.fromuid|getUserFace='s'}" width="50" /></a></div>
                      <div class="LC1">
                        <p class="bg01 pl5"><a href="{:U('space/view','uid='.$svo[fromuid])}">{$svo.fromuid|getUserName}</a> {$svo.cTime|friendlyDate}</p>
                        <p class="pl10 lh30">{$svo.content}</p>
                      </div>
                      <div class="C"></div>
                    </div>
                  </volist>
                  <div id="doreplay_{$vo.id}" style="display:none" class="appra">
                    <div class="headpic50 L"><img src="{$mid|getUserFace='s'}" width="50"/></div>
                    <div class="LC2" >
                      <textarea name="replay_content_{$vo.id}" id="replay_content_{$vo.id}" class="w430_tx line"></textarea><br />
                      <input class="btn_sea" name="" onclick="doreplaywall({$vo.id})" type="button" value="{:L('reply')}" />
                      <input class="btn_sea" name="" onclick='$("#doreplay_{$vo.id}").hide()' type="button" value="{:L('cancel')}" />
                    </div>
                  </div>
                </div>
              </div>
            </li>
          </volist>
        </ul>
        <p class="C"></p>
        <p class="page mt5 alR mb20"> {$html} </p>
      </div>
  </div>
  </div>
  </div>
  <div class="C"></div>
</div>
<include file="__THEME__/footer" /> 